<dl>
  <dt>省份:</dt>
  <dd>
    <%= select_tag :province, 
          Province.all.collect{ |province|  "<option value='#{province.id}' #{province == @province ? 'selected':''}>#{province.name}</option>" }.to_s,
          :onchange => remote_function(
            :update => "user_tool_setting_weather_forecast_city_id",
            :url => cities_url,
            :with => "'&province_id=' + this.value",
            :complete => (
              remote_function(
                :update => "user_tool_setting_weather_forecast_area_id",
                :url => areas_url,
                :with => "'&city_id=' + $F('user_tool_setting_weather_forecast_city_id')",
                :method => :get
              )
            ),
            :method => :get
          ) 
     %>
  </dd>
</dl>      
<dl>
  <dt>城市:</dt>
  <dd>
    <%= f.select :city_id, @province.cities.collect {|c| [ c.name, c.id ] }, {},
          :onchange => remote_function(
            :update => "user_tool_setting_weather_forecast_area_id",
            :url => areas_url,
            :with => "'&city_id=' + this.value",
            :method => :get
          ) 
     %>
  </dd>
</dl>
<dl>
  <dt>城区:</dt>
  <dd>
    <% if setting.new_record? %>
      <%= f.select :area_id, @province.cities.first.areas.collect {|c| [ c.name, c.id ] } %>
    <% else %>
      <%= f.select :area_id, setting.area.city.areas.collect {|c| [ c.name, c.id ] } %>
    <% end %>    
  </dd>
</dl>
<dl>
  <dt>大拼盘所在栏目:</dt>
  <dd>
    <%= f.select :column, [['左栏',1],['中栏',2],['右栏',3]] %>
  </dd>
</dl>
<dl>
  <dt>类型:</dt>
  <dd>
    <%= f.radio_button :date_type,'today', :class => :s %><%= f.label :date_type_today, '今天' %>
    <%= f.radio_button :date_type,'tomorrow', :class => :s %><%= f.label :date_type_tomorrow, '明天' %>
  </dd>
</dl>   
<dl>
  <dt>短信预报:</dt>
  <dd>
    <%= f.check_box :allow_sms,{ :class => 's no'},'yes','no' %><%= f.label :allow_sms, '开通' %>
    <%= link_to_add_fetion_if_setting_user_no_mobile @setting %>
  </dd>
</dl>
<dl>
  <dt>email预报:</dt>
  <dd>
    <%= f.check_box :allow_email,{:class => 's no'},'yes','no' %><%= f.label :allow_email, '开通' %>
  </dd>
</dl>
<dl>
  <dt>每日整点预报:</dt>
  <dd>
    <%= f.select :forecasted_hour,[
          ['0点',0],
          ['1点',1],
          ['2点',2],
          ['3点',3],
          ['4点',4],
          ['5点',5],
          ['6点',6],
          ['7点',7],
          ['8点',8],
          ['9点',9],
          ['10点',10],
          ['11点',11],
          ['12点',12],
          ['13点',13],
          ['14点',14],
          ['15点',15],
          ['16点',16],
          ['17点',17],
          ['18点',18],
          ['19点',19],
          ['20点',20],
          ['21点',21],
          ['22点',22],
          ['23点',23]
        ]  
     %>
  </dd>
</dl> 